import { createApp } from 'vue';
import App from './App.vue';
import router from './router';
import i18n from './i18n';

import VxeTable from 'vxe-table';
import 'vxe-table/lib/style.css';

import VxeUI from 'vxe-pc-ui';
import 'vxe-pc-ui/lib/style.css';

import './style/style.scss';
import './plugins';

import PageView from './views/layout/PageView.vue';
import piniaPluginPersistedState from 'pinia-plugin-persistedstate';
import { createPinia } from 'pinia';
import { install } from '@icon-park/vue-next/es/all';
import '@icon-park/vue-next/styles/index.css';

// 全局设置
VxeUI.setConfig({
    size: "medium",
});

// 创建应用实例, 注册全局组件
const app = createApp(App);

// 全局加载 ParkIcon 图标
app.use(install);

// Pinia 持久化插件
const pinia = createPinia()
pinia.use(piniaPluginPersistedState);

app.component('PageView', PageView);
app.use(router)
    .use(i18n)
    .use(pinia)
    .use(VxeUI)
    .use(VxeTable);

app.mount('#app');

